home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _DBE8C7F768424076832389D2D345788C < prev    next >
Encoding:
Text File  |  2004-01-06  |  2.5 KB  |  66 lines

  1. --------------------------------------------------
  2. --    Created By: Petar
  3.  
  4.  
  5. AIBehaviour.ScrewedAttack = {
  6.     Name = "ScrewedAttack",
  7.  
  8.  
  9.     ---------------------------------------------
  10.     OnPlayerSeen = function( self, entity, fDistance )
  11.         -- called when the enemy sees a living player
  12.         entity:InsertSubpipe(0,"DropBeaconAt");
  13.     end,
  14.     ---------------------------------------------
  15.     OnEnemyMemory = function( self, entity )
  16.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  17.     end,
  18.     ---------------------------------------------
  19.     OnInterestingSoundHeard = function( self, entity )
  20.         -- called when the enemy hears an interesting sound
  21.         entity:InsertSubpipe(0,"DropBeaconAt");
  22.     end,
  23.     ---------------------------------------------
  24.     OnThreateningSoundHeard = function( self, entity )
  25.         -- called when the enemy hears a scary sound
  26.         entity:InsertSubpipe(0,"DropBeaconAt");
  27.     end,
  28.     ---------------------------------------------
  29.     OnReload = function( self, entity )
  30.         -- called when the enemy goes into automatic reload after its clip is empty
  31.     end,
  32.     ---------------------------------------------
  33.     OnGroupMemberDied = function( self, entity )
  34.         -- called when a member of the group dies
  35.     end,
  36.     ---------------------------------------------
  37.     OnNoHidingPlace = function( self, entity, sender )
  38.         -- called when no hiding place can be found with the specified parameters
  39.     end,    
  40.     ---------------------------------------------
  41.     OnReceivingDamage = function ( self, entity, sender)
  42.     end,
  43.     --------------------------------------------------
  44.     OnBulletRain = function ( self, entity, sender)
  45.         -- called when the enemy detects bullet trails around him
  46.     end,
  47.     --------------------------------------------------
  48.     OnCloseContact = function ( self, entity, sender)
  49.         if (entity.MELEE_ANIM_COUNT) then
  50.             local rnd = random(1,entity.MELEE_ANIM_COUNT);
  51.             local melee_anim_name = format("attack_melee%01d",rnd);
  52.             entity:SelectPipe(0,"abberation_melee");
  53.             entity:InsertAnimationPipe(melee_anim_name,3);
  54.         else
  55.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  56.             Hud:AddMessage("Entity "..entity:GetName().." made melee attack but has no melee animations.");
  57.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  58.         end
  59.     end,
  60.     --------------------------------------------------
  61.     SWITCH_TO_ABBERATION_ATTACK = function ( self, entity, sender)
  62.         entity:SelectPipe(0,"mutant_screwed_attack");
  63.     end,
  64.     --------------------------------------------------
  65.  
  66. }